using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using LAMSDK.Security.Entities;

namespace LAMSDK.Security.Mapping
{
	public class PermissionMap : EntityTypeConfiguration<Permission>
	{
		public PermissionMap()
		{
			// Primary Key
			this.HasKey(t => t.FPId);

			// Properties
			this.Property(t => t.FunCode)
				.HasMaxLength(255);
				
			// Table & Column Mappings
			this.ToTable("Permission");
			this.Property(t => t.FPId).HasColumnName("FPId");
			this.Property(t => t.FunCode).HasColumnName("FunCode");
		}
	}
}

